package cn.tansanqinger.controller.topic;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.fasterxml.jackson.databind.ObjectMapper;

import cn.tansanqinger.service.topic.ITopicService;

@Controller
@RequestMapping("/admin/topic")
public class TopicAuditController {
	
	@Autowired
	private ITopicService service;
	
	@RequestMapping("/list3")
	public ModelAndView list(HttpServletRequest request, ModelAndView mv) {
		mv.setViewName("topic/list3");
		return mv;
	}
	
	@RequestMapping("/findListData3")
	@ResponseBody
	public String findListData(HttpServletRequest request) {
		try {
			return new ObjectMapper().writeValueAsString(service.selectMessage(request));
		} catch (Exception e) {}
		return null;
	}
	
}
